﻿using System;
using System.Collections;

namespace AcmeSportsStore
{
    class CustomersItemIndexerById: Indexer
    {
        public class Comparer : IComparer
        {
            public int Compare(object x, object y)
            {
                CustomersItem ciX = (CustomersItem)x;
                CustomersItem ciY = (CustomersItem)y;

                int res = ciX.CustId.CompareTo(ciY.CustId);
                return res;
            }
        }

        public readonly static Comparer IdComparer = new Comparer();

        public CustomersItemIndexerById()
            : base(IdComparer, IdComparer)
        {
        }
    }
}
